styleproperty: Assign a unique id to every styleproperty
authorBenjamin Otte <otte@redhat.com>
Fri, 23 Dec 2011 11:31:16 +0000 (12:31 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Jan 2012 17:37:49 +0000 (18:37 +0100)
gtk/gtkstyleproperty.c
gtk/gtkstylepropertyprivate.h

index d300fefbca6312406d9bc3b086aef05dd9190409..f27cd730dcd9caf023495a634aeb43ba53987004 100644 (file)
@@ -52,6 +52,7 @@
 static GHashTable *parse_funcs = NULL;
 static GHashTable *print_funcs = NULL;
 static GHashTable *properties = NULL;
+static guint __n_style_properties = 0;
 
 static void
 register_conversion_function (GType             type,
@@ -3130,6 +3131,7 @@ _gtk_style_property_register (GParamSpec               *pspec,
 
   node = g_slice_new0 (GtkStyleProperty);
   node->flags = flags;
+  node->id = __n_style_properties++;
   node->pspec = pspec;
   node->property_parse_func = property_parse_func;
   node->pack_func = pack_func;
index 6aa6d59c541841db56100805d2c29868458267cc..5e33209b88b825ec79f20aad2ca72f53b4a8e700 100644 (file)
@@ -52,6 +52,7 @@ struct _GtkStyleProperty
 {
   GParamSpec               *pspec;
   GtkStylePropertyFlags     flags;
+  guint                     id;
 
   GtkStylePropertyParser    property_parse_func;
   GtkStyleUnpackFunc        unpack_func;